﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using QLTV_BLL;
using QLTV_Public;

namespace QLTV_GiaoDien
{
    public partial class uc_ThongKeTheoTheLoai : DevExpress.XtraEditors.XtraUserControl
    {
        public uc_ThongKeTheoTheLoai()
        {
            InitializeComponent();
        }
        ThongKe_BLL thongKe = new ThongKe_BLL();
        private void uc_ThongKeTheoTheLoai_Load(object sender, EventArgs e)
        {

            gridControl1.DataSource = thongKe.LayDuLieu();
            //txt_TongSo.Text = (gridView1.RowCount).ToString();
        }

        private void bbi_XemChiTiet_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            frm_ChiTietTheLoai f = new frm_ChiTietTheLoai();
            f.TenTheLoai = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "Tên Thể Loại").ToString();
            f.ShowDialog();
        }

        private void gridControl1_DoubleClick(object sender, EventArgs e)
        {
            try
            {
                frm_ChiTietTheLoai f = new frm_ChiTietTheLoai();
                f.TenTheLoai = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "Tên Thể Loại").ToString();
                f.ShowDialog();
            }
            catch (Exception)
            { }
        }
    }
}
